from ronglian_sms_sdk import SmsSDK

accId = '2c94811c9860a9c40198e020f4331500'
accToken = '28065f7cf5e740a7b3c20ef420785e2d'
appId = '2c94811c9860a9c40198e020f5b61507'


class SmsCode:
    def send(self, phone, code):
        # 初始化实例
        sdk = SmsSDK(accId, accToken, appId)
        tid = "1"  # 测试账号只能用1
        mobile = phone
        datas = (code,)
        resp = sdk.sendMessage(tid, mobile, datas)
        return resp


sms = SmsCode()
